{template 'header', $template}
<div class="dsn" id="pos_show">您当前的位置：<a href="{$COM[linkurl]}">首页</a> &raquo; <a href="{$MENU[$menuid][linkurl]}">{$MENU[$menuid][name]}</a>{if $itemid} &raquo; {$title}{/if}</div>
{if $itemid}
{load('mall.css')}
<div class="main_head"><div><strong>{$title}</strong></div></div>
<div class="main_body">	
		<table width="100%" align="center">
		<tr>
		<td width="250" valign="top">
			<div id="mid_pos"></div>
			<div id="mid_div" onmouseover="SAlbum();" onmouseout="HAlbum();" onclick="PAlbum(Dd('mid_pic'));">
			<img src="{$albums[0]}" width="240" height="180" id="mid_pic"/><span id="zoomer"></span>
			</div>
			<div class="b5"></div>
			<div>
			{loop $thumbs $k $v}<img src="{$v}" width="60" height="60" onmouseover="if(this.src.indexOf('nopic60.gif')==-1)Album({$k}, '{$albums[$k]}');" class="{if $k}ab_im{else}ab_on{/if}" id="t_{$k}"/>{/loop}
			</div>
			<div class="b5"></div>
			<div onclick="PAlbum(Dd('mid_pic'));" class="c_b t_c c_p"><img src="{DT_SKIN}image/ico_zoom.gif" width="16" height="16" align="absmiddle"/> 点击图片查看原图</div>
		</td>
		<td width="15"> </td>
		<td valign="top">
			<div id="big_div" style="display:none;"><img src="" id="big_pic"/></div>
			{if $a2}
			<div class="step_price">
			<table width="100%" cellpadding="6" cellspacing="0">
			<tr>
			<td>起批</td>
			<td>{$a1}-{$a2}{$unit}</td>
			{if $a3}
			<td>{$a2+1}-{$a3}{$unit}</td>
			<td>{$a3}{$unit}以上</td>
			{else}
			<td>{$a2+1}{$unit}以上</td>
			{/if}
			</tr>
			<tr>
			<td>价格</td>
			<td class="f_price">{$DT[money_sign]}<span class="px13">{$p1}</span></td>
			{if $a3}
			<td class="f_price">{$DT[money_sign]}<span class="px13">{$p2}</span></td>
			<td class="f_price">{$DT[money_sign]}<span class="px13">{$p3}</span></td>
			{else}
			<td class="f_price">{$DT[money_sign]}<span class="px13">{$p2}</span></td>
			{/if}
			</tr>
			</table>
			</div>
			{/if}
			<table width="100%" cellpadding="4" cellspacing="4">
			{if !$a2}
			<tr>
			<td>单价：</td>
			<td class="f_price">{$DT[money_sign]}<span class="px16">{$price}</span></td>
			</tr>
			{/if}
			{if $express_name_1 == '包邮'}
			<tr>
			<td>物流：</td>
			<td>
			{if $fee_start_1>0}
			{if $fee_start_2>0} {$express_name_2}:{$fee_start_2}&nbsp;&nbsp;{/if}
			{if $fee_start_3>0} {$express_name_3}:{$fee_start_3}&nbsp;&nbsp;{/if}
			满{$fee_start_1}包邮
			{else}
			包邮
			{/if}</td>
			</tr>
			{elseif $fee_start_1>0 || $fee_start_2>0 || $fee_start_3>0}
			<tr>
			<td>物流：</td>
			<td class="f_gray">
			{if $fee_start_1>0} {$express_name_1}:{$fee_start_1}&nbsp;&nbsp;{/if}
			{if $fee_start_2>0} {$express_name_2}:{$fee_start_2}&nbsp;&nbsp;{/if}
			{if $fee_start_3>0} {$express_name_3}:{$fee_start_3}&nbsp;&nbsp;{/if}
			</td>
			</tr>
			{/if}
			{if $cod}
			<tr>
			<td>到付：</td>
			<td>支持货到付款</td>
			</tr>
			{/if}
			<tr>
			<td>品牌：</td>
			<td>{if $brand}<a href="{$MOD[linkurl]}search.php?fields=4&kw={urlencode($brand)}" target="_blank" rel="nofollow">{$brand}</a>{else}未填写{/if}</td>
			</tr>
			<tr>
			<td>地区：</td>
			<td>{area_pos($areaid, '')}</td>
			</tr>
			<tr>
			<td>销量：</td>
			<td><a href="{$linkurl}#order" target="_blank">累计出售 <span class="f_orange">{$sales}</span> 件，{$orders} 个订单</a></td>
			</tr>
			<tr>
			<td>评价：</td>
			<td><a href="{$linkurl}#comment" target="_blank">已有 <span class="f_orange">{$comments}</span> 条评价</a></td>
			</tr>
			<tr>
			<td>库存：</td>
			<td>还剩 <span class="f_orange">{$amount}</span> 件</td>
			</tr>
			<tr>
			<td>人气：</td>
			<td>已有 <span class="f_orange"><span id="hits">{$hits}</span></span> 人关注</td>
			</tr>
			<tr>
			<td width="50">更新：</td>
			<td>{$editdate}</td>
			</tr>
			{if $RL}
			<tr>
			<td>{$relate_name}：</td>
			<td>
			{loop $RL $v}
			<div class="relate_{if $itemid==$v[itemid]}2{else}1{/if}">{if $itemid==$v[itemid]}<em></em>{/if}<a href="{userurl($username, 'file=mall&itemid='.$v[itemid])}"><img src="{$v[thumb]}" alt="" title="{$v[relate_title]}"/></a></div>
			{/loop}				
			</td>
			</tr>
			{/if}
			{if $P1}
			<tr>
			<td>{$n1}：</td>
			<td id="p1">
			<ul>
			{loop $P1 $i $v}
			<li class="nv_{if $i==0}2{else}1{/if}">{$v}</li>
			{/loop}
			</ul>
			</td>
			</tr>
			{/if}
			{if $P2}
			<tr>
			<td>{$n2}：</td>
			<td id="p2">
			<ul>
			{loop $P2 $i $v}
			<li class="nv_{if $i==0}2{else}1{/if}">{$v}</li>
			{/loop}
			</ul>
			</td>
			</tr>
			{/if}
			{if $P3}
			<tr>
			<td>{$n3}：</td>
			<td id="p3">
			<ul>
			{loop $P3 $i $v}
			<li class="nv_{if $i==0}2{else}1{/if}">{$v}</li>
			{/loop}
			</ul>
			</td>
			</tr>
			{/if}
			{if $status == 4}
			<tr>
			<td></td>
			<td><strong class="f_red">该商品已下架</strong></td>
			</tr>
			{/if}
			</table>
			{if $status == 3 && $amount > 0}
			<div>
			<img src="{DT_SKIN}image/btn_tobuy.gif" alt="立即购买" class="c_p" onclick="BuyNow();"/>
			&nbsp;
			<img src="{DT_SKIN}image/btn_addcart.gif" alt="加入购物车" class="c_p" onclick="AddCart();"/>
			</div>
			{/if}
		</td>
		</tr>
		</table>
	</div>
	<div class="main_head"><div><strong>详细信息</strong></div></div>
	<div class="main_body">
		{if $CP}{template 'property', 'chip'}{/if}
		<div class="content" id="content">{$content}</div>
	</div>
	<script type="text/javascript">
	var content_id = 'content';
	var img_max_width = {$MOD[max_width]};
	</script>
	<script type="text/javascript" src="{DT_STATIC}file/script/content.js"></script>
	<script type="text/javascript" src="{DT_STATIC}file/script/jquery.js"></script>
	<script type="text/javascript">
	var s_s = {'1':0,'2':0,'3':0};
	function addE(i) {
		$('#p'+i+' li').mouseover(function() {
			if(this.className == 'nv_1') this.className = 'nv_3';
		});
		$('#p'+i+' li').mouseout(function() {
			if(this.className == 'nv_3') this.className = 'nv_1';
		});
		$('#p'+i+' li').click(function() {
			$('#p'+i+' li')[s_s[i]].className = 'nv_1';
			this.className = 'nv_2';
			s_s[i] = $(this).index();
		});
	}
	{if $p1}addE(1);{/if}
	{if $p2}addE(2);{/if}
	{if $p3}addE(3);{/if}
	function BuyNow() {
		Go('{$MOD[linkurl]}buy.php?itemid={$itemid}&s1='+s_s[1]+'&s2='+s_s[2]+'&s3='+s_s[3]);
	}
	function AddCart() {
		Go('{$MOD[linkurl]}cart.php?itemid={$itemid}&s1='+s_s[1]+'&s2='+s_s[2]+'&s3='+s_s[3]);
	}
	</script>
{else}
<div class="main_head">
<div>
<span class="f_r f_n px12">
{if $view}
<a href="{userurl($username, 'file=mall&typeid='.$typeid, $domain)}">以橱窗方式浏览</a> | <strong>以目录方式浏览</strong>
{else}
<strong>以橱窗方式浏览</strong> | <a href="{userurl($username, 'file=mall&view=1&typeid='.$typeid, $domain)}">以目录方式浏览</a>
{/if}
</span>
<strong>商品列表</strong>
</div>
</div>
<div class="main_body">
{if $view}
	<table cellpadding="5" cellspacing="1" width="100%" align="center">
	<tr bgcolor="#F1F1F1">
	<th width="100">图片</th>
	<th>标 题</th>
	<th width="110">更新时间</th>
	</tr>
	{loop $lists $k $v}
	<tr align="center"{if $k%2==1} bgcolor="#FBFBFB"{/if}>
	<td height="100"><a href="{$v[linkurl]}"><img src="{$v[thumb]}" width="80" height="80" alt="" style="border:#C0C0C0 1px solid;"/></a></td>
	<td align="left" class="lh18"><a href="{$v[linkurl]}" class="px13">{$v[title]}</a><br/>
	价格：{$DT[money_sign]}<strong class="f_red">{$v[price]}</strong><br/>
	品牌：{$v[brand]}&nbsp;销量：{$v[orders]}&nbsp;评论：{$v[comments]}
	</td>
	<td>{timetodate($v[edittime], 3)}</td>
	</tr>
	{/loop}
	</table>
{else}
	<table cellpadding="0" cellspacing="0" width="100%">
	{loop $lists $k $v}
	{if $k%4==0}<tr align="center">{/if}
	<td valign="top" width="25%" height="180">
	<div class="thumb" onmouseover="this.className='thumb thumb_on';" onmouseout="this.className='thumb';">
		<a href="{$v[linkurl]}"><img src="{$v[thumb]}" width="100" height="100" alt="{$v[alt]}"/></a>
		<div><a href="{$v[linkurl]}">{$v[title]}</a></div>
		<span class="f_price">{$DT[money_sign]}{$v[price]}</span>
	</div>
	</td>
	{if $k%4==3}</tr>{/if}
	{/loop}
	</table>
{/if}
	<div class="pages">{$pages}</div>
</div>
<script type="text/javascript">
try {Dd('type_{$typeid}').innerHTML = '<strong>'+Dd('name_{$typeid}').innerHTML+'</strong>';}catch (e){}
</script>
{/if}
{template 'footer', $template}